<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<link rel="stylesheet" type="text/css" href="./css/style.css" />
<link rel="stylesheet" type="text/css" href="css/gggggggggggg.css" />
<link rel="stylesheet" type="text/css" href="css/hhhhhhhhhhhhh.css" />
 <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>    
        
	<script type="text/javascript" src="js/select.js"></script>
	

</head>
<body>
<div class="soubg">
	<div class="sou">
    	<!--Begin 所在收货地区 Begin-->
    	<span class="s_city_b">
        	<span class="fl">送货至：</span>
            <span class="s_city">
            	<span>四川</span>
                <div class="s_city_bg">
                	<div class="s_city_t"></div>
                    <div class="s_city_c">
                    	<h2>请选择所在的收货地区</h2>
                        <table border="0" class="c_tab" style="width:235px; margin-top:10px;" cellspacing="0" cellpadding="0">
                          <tbody><tr>
                            <th>A</th>
                            <td class="c_h"><span>安徽</span><span>澳门</span></td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td class="c_h"><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td class="c_h"><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td class="c_h"><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td class="c_h"><span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span></td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td class="c_h"><span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span></td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td class="c_h"><span>江苏</span><span>吉林</span><span>江西</span></td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td class="c_h"><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td class="c_h"><span>内蒙古</span><span>宁夏</span></td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td class="c_h"><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td class="c_h"><span>上海</span><span>山东</span><span>山西</span><span class="c_check">四川</span><span>陕西</span></td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td class="c_h"><span>台湾</span><span>天津</span></td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td class="c_h"><span>西藏</span><span>香港</span><span>新疆</span></td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td class="c_h"><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td class="c_h"><span>浙江</span></td>
                          </tr>
                        </tbody></table>
                    </div>
                </div>
            </span>
        </span>
        <!--End 所在收货地区 End-->
        <span class="fr">
        	<span class="fl">你好，请<a href="Login.html">登录</a>&nbsp; <a href="Regist.html" style="color:#ff4e00;">免费注册</a>&nbsp;|&nbsp;<a href="#">我的订单</a>&nbsp;|</span>
        	<span class="ss">
				你猜
            	<div class="ss_list">
                	<a href="#">收藏夹</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">我的收藏夹</a></li>
                                <li><a href="#">我的收藏夹</a></li>
                            </ul>
                        </div>
                    </div>     
                </div>
                <div class="ss_list">
                	<a href="#">客户服务</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">客户服务</a></li>
                                <li><a href="#">客户服务</a></li>
                                <li><a href="#">客户服务</a></li>
                            </ul>
                        </div>
                    </div>    
                </div>
                <div class="ss_list">
                	<a href="#">网站导航</a>
                    <div class="ss_list_bg">
                    	<div class="s_city_t"></div>
                        <div class="ss_list_c">
                        	<ul>
                            	<li><a href="#">网站导航</a></li>
                                <li><a href="#">网站导航</a></li>
                            </ul>
                        </div>
                    </div>    
                </div>
            </span>
            <span class="fl">|&nbsp;关注我们：</span>
            <span class="s_sh"><a href="#" class="sh1">新浪</a><a href="#" class="sh2">微信</a></span>
            <span class="fr">|&nbsp;<a href="#">手机版&nbsp;<img src="images/s_tel.png" align="absmiddle" style="padding-top: 8px"></a></span>
        </span>
    </div>
</div>















	<div class="wrap">
		<!-- main begin-->
		<div class="sale">
			<h1 class="lf">留言板</h1>
			<div class="logout right">
				<a href="Login.html" title="注销">注销</a>
			</div>
		</div>

		<div class="items">
			
			<table width=100% cellspacing=0 cellpading=0>
			<thead>
				<tr class="rows even strong">
					<td>姓名</td>
					<td class="list-wd">商品</td>
					<td>评论标题</td>
					<td>评论内容</td>
					<td>评论时间</td>
					<td class="borderno">操作</td>
				</tr>
			</thead>
				<tbody>
					<c:if test="${product_Comment!= null}">
						<c:forEach items="${product_Comment}" var="product_Comment"
							varStatus="status">
							<tr>
								<td >${product_Comment.user_id}</td>
								<td>${product_Comment.product_id}</td>
								<td>${product_Comment.title}</td>
								<td>${product_Comment.content}</td>
								<td>${product_Comment.audit_time}</td>
								<td><a href="#" class="tablelink">编辑</a><a
									href="javascript:void(0);" onclick="deleteList(this)"
									class="tablelink">
										
									<a href="javascript:void(0);" onclick="deleteList(this)" > 删除</a></td>
							</tr>
							 <input type="hidden" value="${product_Comment.user_id}"
								  id="user_id" />
							 <input type="hidden" value="${product_Comment.comment_id}"
							 								  id="comment_id" />
						</c:forEach>
					</c:if>
				</tbody>
			</table>



			<div class="page">
				<a href="#" title="">首页</a> <a href="#" title="">上一页</a> <span
					class="red">前5页</span> <a href="#" title="">1</a> <a href="#"
					title="">2</a> <a href="#" title="">3</a> <a href="#" title="">4</a>
				<a href="#" title="">5</a> <a href="#" title="">下一页</a> <a href="#"
					title="">尾页</a>
			</div>
		</div>
		<script type="text/javascript">
			
				
			function deleteList(collection) {

				var flag = confirm('确认删除吗？');
				
				if (flag) {
					var comment_id = $('#comment_id').attr('value');
					var user_id = $('#user_id').attr('value');
					var id = collection.parentNode.parentNode.children[0].innerText;
					alert(comment_id);
					console.log(id);
						$.getJSON(
						"DeleteMmessageServlet", {
							"comment_id": comment_id
						},
						function(data) {
							location.href="http://localhost/easy_buy/ShowLeaveMessageServlet";
						}
					)
				}

			};
			/* function deleteList(collection) {
				// var collectionPageNo = jQuery('#CollectionNo').attr('value');
				var comment_id = $('#comment_id').attr('value');
				var user_id = $('#user_id').attr('value');
				var id = collection.parentNode.parentNode.children[0].inner
				Text;
				alert(comment_id);
				console.log(id);
					$.getJSON(
					"DeleteMmessageServlet", {
						"comment_id": comment_id
					},
					function(data) {
						location.href="http://localhost/easy_buy/ShowLeaveMessageServlet";
					}
				)

			
			}; */
		</script>

		<!-- main end-->
	</div>
</body>
</html>